package gof.com.yew.prototype;

import java.io.Serializable;

/**
 * 原型模式
 * 1.继承 Cloneable，重写 clone()
 * 2.浅克隆---Java Clone实现
 * 3.深克隆---实现 Serializable 读取二进制流
 * @author yw
 */
public class Sheep2 implements Serializable{

	private static final long serialVersionUID = 1L;

	private String name;

	private Address address;

	public Sheep2(String name, Address address) {
		this.name = name;
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

}